package com.isoft.dao.tabledao;

import com.isoft.entity.tableentity.dfme_depe.DfmeDepeDflt;
import com.isoft.entity.tableentity.dfme_depe.DfmeDepeMeta;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;

@Mapper
public interface DfmeDepeDao {
    @Insert("insert into TEAM04.COMMON_META( create_time, sndr, rcvr, seqn, ddtm,type, styp) " +
            "values( #{create_time}, #{meta.sndr}, #{meta.rcvr}, #{meta.seqn}," +
            " #{meta.ddtm}, #{meta.type}, #{meta.styp})")
    public int insertMeta(@Param("create_time") Timestamp create_time,
                          @Param("meta")DfmeDepeMeta dfmeDepeMeta);
    @Insert("insert into TEAM04.DFME_DEPE(meta_id,create_time,flid,fatt,ffid,fide,stat,ista,msta,mist,frtt) " +
    "values(#{meta_id},#{create_time},#{dflt.flid},#{dflt.fatt},#{dflt.ffid},#{dflt.fide},#{dflt.stat}," +
            "#{dflt.ista},#{dflt.msta},#{dflt.mist},#{frtt})")
    public int insertDflt(@Param("meta_id") int meta_id,
                          @Param("create_time") Timestamp create_time,
                          @Param("frtt") Timestamp frtt,
                          @Param("dflt") DfmeDepeDflt dfmeDepeDflt);
}
